mm: unmap page for direct mapped domain on decrease reservation
authorJulien Grall <julien.grall@citrix.com>
Tue, 27 Oct 2015 13:47:01 +0000 (14:47 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 27 Oct 2015 13:47:01 +0000 (14:47 +0100)
commit68f2e49032fa32c9cc5413994d8b072d3d2bd048
treed5f2648332c5bc813406952ecd90983d666f058e
parent61031e64d3dafd2fb1953436444bf02eccb9b146
mm: unmap page for direct mapped domain on decrease reservation

Direct mapped domain needs to retrieve the exact same underlying
physical page when the region is re-populated.

Currently, when the memory reservation for this domain is decreased, the
request is just ignored and the page stayed mapped in the P2M. However,
this make more difficult to spot issue when the domain has not yet mapped
foreign page but trying to access the region.

What we really care for direct mapped domain is to not give back the
page to the allocator. So we can re-enable to direct mapped when the guest
memory region is re-populated.

The rest of the process to remove a page can be safely done. This
also ensures us to stay close to the normal domain memory handling.

At the same time, drop the trailing whitespaces around the code
modified.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/memory.c